﻿@using Masuit.MyBlogs.Core.Common

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>正在检测您的浏览器环境，请稍候......</title>
    <script src="https://cdn.staticfile.org/jquery/3.6.0/jquery.min.js"></script>
    <script src="/Scripts/global/functions.js"></script>
</head>
<body>
    <noscript>
        <style>
            h3 {
                display: none !important;
            }
        </style>
        <div style="position: absolute;top: 0;left: 0;right: 0;bottom: 0;">
            <h2>检测到您的浏览器不支持javascript或已禁用javascript功能，当前页面无法正常显示！</h2>
        </div>
    </noscript>
    <form>
        @Html.AntiForgeryToken()
    </form>
    <h3>正在检测您的浏览器环境，请稍候，页面将自动刷新......</h3>
    @Html.Raw(CommonHelper.SystemSettings.GetOrAdd("Scripts", ""))
</body>
</html>
<script>
    setTimeout(function () {
        var formData = new FormData();
        formData.append("__RequestVerificationToken", document.querySelector("[name='__RequestVerificationToken']").value);
        window.fetch("/challenge", {
            credentials: 'include',
            method: 'POST',
            mode: 'cors',
            body: formData
        }).then(function (response) {
            location.reload();
        }).catch(function (e) {
            alert("页面加载失败，请关闭掉额外的浏览器插件扩展后刷新重试！");
        });
    }, 2000);
</script>